package cn.javass.test.sample.vo;

import java.io.Serializable;

import cn.javass.test.sample.UserTypeEnum;

@SuppressWarnings("serial")
public class UserModel implements Serializable {
	private int uuid;
	private String name;
	private String xuehao;
	private int age;
	
	public int getUuid() {
		return uuid;
	}
	public void setUuid(int uuid) {
		this.uuid = uuid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getXuehao() {
		return xuehao;
	}
	public void setXuehao(String xuehao) {
		this.xuehao = xuehao;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}

	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + uuid;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserModel other = (UserModel) obj;
		if (uuid != other.uuid)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "UserModel {uuid=" + uuid + ", name=" + name + ", xuehao="
				+ xuehao + ", age=" + UserTypeEnum.getNameByType(age)+ "}";
	}
	
}
